package xin.infinite.note.controller;

import com.alibaba.dubbo.config.annotation.Reference;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import xin.infinite.Service.NoteService;
import xin.infinite.pojo.Note;
import xin.infinite.pojo.PageObject;
import xin.infinite.vo.JsonResult;

@RestController
@RequestMapping("/note")
public class NoteController {

    @Reference
    private NoteService noteService;

    /**
     * 业务需求
     *      1.搜索所有的帖子信息
     *      2.url ： note/doFindPageObjects
     * 返回的是：JsonResult
     */
    @RequestMapping("/doFindPageObjects")
    public JsonResult findAllNote(String username,Integer pageCurrent){
        PageObject<Note> data=noteService.findAllNote(username,pageCurrent);
        System.out.println("执行了");
        return JsonResult.success();
    }




}
